<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', function () {
    return view('welcome');
});

//魅族后台
Route::get('/admin/homeuser/index','Admin\HomeuserController@index');
Route::post("/admin/homeuser/ajaxUpdate",'Admin\HomeuserController@ajaxUpdate');

Route::get('/admin/index','Admin\IndexController@index');



// 后台首页
Route::get('/admin/', "Admin\Indexcontroller@index");

// 后台用户管理首页
Route::get('/admin/user', "Admin\Usercontroller@index");
// 后台用户添加页面
Route::get('/admin/user/add', "Admin\Usercontroller@add");
// 后台用户插入页面
Route::post('/admin/user/insert', "Admin\Usercontroller@insert");
// 后台通过 ajaxUpdate 修改用户状态
Route::post('/admin/user/ajaxUpdate',"Admin\Usercontroller@ajaxUpdate");
// 后台双击通过 ajaxUpdateUsername 修改用户名
Route::post('/admin/user/ajaxUpdateUsername',"Admin\Usercontroller@ajaxUpdateUsername");
// 后台修改用户资料
Route::get('/admin/user/edit/{id}',"Admin\Usercontroller@edit");
// 后台修改用户资料
Route::post('/admin/user/doedit',"Admin\Usercontroller@doedit");
// 后台删除用户资料
Route::get('/admin/user/delete/{id}',"Admin\Usercontroller@delete");

// 后台商品类型管理首页
Route::get('/admin/type', "Admin\Typecontroller@index");
// 后台商品类型管理首页
Route::get('/admin/type/addMain', "Admin\Typecontroller@addMain");
// 后台商品类型管理首页
Route::post('/admin/type/insertMain', "Admin\Typecontroller@insertMain");
// 后台商品类型添加页面
Route::get('/admin/type/add/{id}', "Admin\Typecontroller@add");
// 后台商品类型插入页面
Route::post('/admin/type/insert', "Admin\Typecontroller@insert");
// 后台修改用户资料
Route::get('/admin/type/edit/{id}',"Admin\Typecontroller@edit");
// 后台修改用户资料
Route::post('/admin/type/doedit',"Admin\Typecontroller@doedit");
// 后台删除用户资料
Route::get('/admin/type/delete/{id}',"Admin\Typecontroller@delete");

// 后台商品管理首页
Route::get('/admin/goods', "Admin\Goodcontroller@index");
// 后台商品类型添加前页面,为选择需要添加分类名称
Route::get('/admin/goods/preAdd', "Admin\Goodcontroller@preAdd");
// 后台商品类型添加页面
Route::get('/admin/goods/add/{id}', "Admin\Goodcontroller@add");
// 后台商品类型添加页面
Route::get('admin/goods/goodedit/{id}', "Admin\Goodcontroller@goodedit");
// 后台商品类型添加页面
Route::post('admin/goods/updateDetail', "Admin\Goodcontroller@updateDetail");
// 后台商品类型插入页面
Route::post('/admin/goods/insert', "Admin\Goodcontroller@insert");
// 后台修改用户资料
Route::get('/admin/goods/edit/{id}',"Admin\Goodcontroller@edit");
// 后台修改用户资料
Route::post('/admin/goods/doedit',"Admin\Goodcontroller@doedit");
// 后台删除用户资料
Route::get('/admin/goods/delete/{id}',"Admin\Goodcontroller@delete");
// 后台双击通过 ajaxUpdateData 修改用户名,库存,价格
Route::post('/admin/goods/ajaxUpdateData',"Admin\Goodcontroller@ajaxUpdateData");
// 后台双击通过 ajaxUpdateStatus 修改用户名,库存,价格
Route::post('/admin/goods/ajaxUpdateStatus',"Admin\Goodcontroller@ajaxUpdateStatus");
// 后台双击通过 ajaxUpdateStatus 修改商品详情
Route::post('admin/goods/goodedit/ajaxUpdateDetail',"Admin\Goodcontroller@ajaxUpdateDetail");
// 后台删除具体商品
Route::get('admin/goods/goodedit/deleteDetail/{id}',"Admin\Goodcontroller@deleteDetail");
// 后台修改商品详情
Route::get('admin/goods/goodedit/edit/editDetail/{id}/{good_id}',"Admin\Goodcontroller@editDetail");
// 后台双击通过 ajaxUpdateStatus 修改用户名,库存,价格
Route::post('/admin/goods/goodedit/doeditDetail',"Admin\Goodcontroller@doeditDetail");






/*
|--------------------------------------------------------------------------
| 这是前台的路由控制器中的智能硬件
|--------------------------------------------------------------------------
*/


Route::get('/home/item/hardware/{cid}', "Home\Hardwarecontroller@index");
 



/*
|--------------------------------------------------------------------------
| 这是前台的路由控制器中的配件
|--------------------------------------------------------------------------
*/


// Route::get('/home/item/fitting/{cid}', "Home\Fittingcontroller@index");





//魅族前台
//魅族官网首页
Route::get('/home/index','Home\IndexController@index');
//魅族专卖店
Route::get('/home/web/monopoly/monopoly','Home\IndexController@monopoly');
Route::get('/home/web/monopoly/goodMonopoly','Home\IndexController@goodMonopoly');

Route::post('/home/web/ajaxUpdate','Home\IndexController@ajaxUpdate');
//魅族品牌日
Route::get('/home/web/brand','Home\IndexController@brand');
//魅族商品收藏
Route::get('/home/member/collect','Home\IndexController@collect');
//魅族商品订单生成页
Route::get('/home/order/order','Home\IndexController@order');
Route::get('/home/order/payment','Home\IndexController@payment');



//后台商品收藏

